// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 设计标准状态枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-03-31
 */
public enum DesignStatusEnum {
    PREPARATION(0, "编制中"),
    REVIEW(1, "审核中"),
    PUBLISHED(2, "已发布"),
    REPEALED(3, "已废止");
    private int value;

    private String name;

    DesignStatusEnum(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public static String getNameByValue(int value) {
        DesignStatusEnum arrObj[] = DesignStatusEnum.values();
        for (DesignStatusEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return " ";
    }

}
